package com.ruoyi.hazard.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.hazard.domain.HazardAlarmInfo;
import com.ruoyi.hazard.domain.HazardInfo;
import com.ruoyi.hazard.domain.dto.HazardInfoDto;
import com.ruoyi.hazard.domain.qo.HazardInfoPageQo;
import com.ruoyi.hazard.domain.qo.HazardInfoQo;
import com.ruoyi.hazard.domain.vo.HazardAlarmVo;
import com.ruoyi.hazard.domain.vo.HazardAmountAnalysisVo;
import com.ruoyi.hazard.domain.vo.HazardInfoVo;
import com.ruoyi.hazard.domain.vo.HazardStatisticsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * 隐患信息数据库访问层
 *
 * @author admin
 * @since 2025-07-23 10:50:03
 */
@Mapper
public interface HazardInfoMapper extends BaseMapper<HazardInfo> {

    List<HazardStatisticsVo> getHazardTypeStatistics(@Param("deptId") Long deptId);

    List<HazardStatisticsVo> getHazardLevelStatistics(@Param("deptId") Long deptId);

    List<HazardAmountAnalysisVo> getHazardAmountAnalysis(@Param("deptId") Long deptId);

    HazardAlarmVo getHazardAlarm(@Param("deptId") Long deptId,@Param("deltaId") Long deltaId);

    IPage<HazardInfoDto> getpageHazard(IPage<HazardInfoDto> page, @Param("qo") HazardInfoPageQo qo);

    List<HazardInfoDto> getListHazard( @Param("qo") HazardInfoQo qo);

    HazardInfo selectHazardInfoByVo(@Param("vo") HazardInfoVo hazardInfoVo);

    List<HazardInfoDto> getUnfinishedHazardInfo();

    HashMap<String, Object> getHazardAlarmInfo(@Param("deptId") Long deptId, @Param("deltaId") Long deltaId, @Param("alarm_delayed") int alarm_delayed);
}

